﻿using BCCommon;
using BCCommon.TMS.Driver;
using BCDto.Sim.Admin.Admin;
using BCDto.TMS.LearnTrain.DriverLearningTrainRecord;
using BCDto.TMS.LearnTrain.DriverLearningTrainRecord.DriverLearningTrainRecordRequest;
using System;
using BCDto.TMS.LearnTrain.PendingLearningVehicle.PendingLearningVehicleRequestDto;

namespace BCService.TMS.LearningTrain.DriverLearningTrainRecord
{
    public interface IDriverLearningTrainRecordService
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="requestDto">安全培训通过</param>
        /// <param name="driverId">司机id</param>
        /// <returns></returns>
        DriverLearningTrainRecordDto Add(DriverLearningTrainRecordRequestDto requestDto, long driverId);

        /// <summary>
        /// 获取培训历史记录
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="driverName">司机名称</param>
        /// <param name="driverRoleType">角色</param>
        /// <param name="vehicleNo">车牌号</param>
        /// <param name="phone">手机号</param>
        /// <param name="trainingSiteConfigId">培训点配置id</param>
        /// <param name="trainingStartDate">培训开始日期</param>
        /// <param name="trainingEndDate">培训结束日期</param>
        /// <param name="learnTrainPassedStartDate">培训通过开始日期</param>
        /// <param name="learnTrainPassedEndDate">培训通过结束日期</param>
        /// <param name="learnTrainSignStartDate">培训签到开始日期</param>
        /// <param name="learnTrainSignEndDate">培训签到结束日期</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        PageableList<DriverLearningTrainRecordViewDto> GetListAsync(AdminDto admin, string driverName,
             DriverRoleType? driverRoleType, string vehicleNo, string phone, long? trainingSiteConfigId, DateTime? trainingStartDate,
             DateTime? trainingEndDate, DateTime? learnTrainPassedStartDate, DateTime? learnTrainPassedEndDate, 
             DateTime? learnTrainSignStartDate,DateTime? learnTrainSignEndDate,int pageIndex, int pageSize);

        /// <summary>
        /// 通过考试
        /// </summary>
        /// <param name="admin">管理员</param>
        /// <param name="vehicleTrainingScheduleRecordId">考试安排记录id</param>
        /// <param name="pendingLearningVehicleId">待培训id</param>
        /// <returns></returns>
        bool LearnTrainPassed(AdminDto admin,long vehicleTrainingScheduleRecordId, PendingLearningVehicleIdRequestDto pendingLearningVehicleId);
    }
}